package com.elinkway.infinitemovies.utils;

import android.util.Log;

public class LogUtils {

    public static final String TAG = "LogUtil";

    public static boolean DEBUG = MoviesConstant.DEBUG;

    public static void v(String tag, String msg) {
        if (DEBUG)
            Log.v(tag, msg);
    }

    public static void v(String tag, String msg, Throwable t) {
        if (DEBUG)
            Log.v(tag, msg, t);
    }

    public static void d(String tag, String msg) {
        if (DEBUG)
            Log.d(tag, msg);
    }

    public static void d(String tag, String msg, Throwable t) {
        if (DEBUG)
            Log.d(tag, msg, t);
    }

    public static void i(String tag, String msg) {
        if (DEBUG)
            Log.i(tag, msg);
    }

    public static void i(String tag, String msg, Throwable t) {
        if (DEBUG)
            Log.i(tag, msg, t);
    }

    public static void w(String tag, String msg) {
        if (DEBUG)
            Log.w(tag, msg);
    }

    public static void w(String tag, String msg, Throwable t) {
        if (DEBUG)
            Log.w(tag, msg, t);
    }

    public static void e(String tag, String msg) {
        if (DEBUG)
            Log.e(tag, msg);
    }

    public static void e(String tag, String msg, Throwable t) {
        if (DEBUG)
            Log.e(tag, msg, t);
    }

    public static void userTime(String event, Long startTime) {
        if (DEBUG)
            Log.e("useTime", event + " use time is " + (System.currentTimeMillis() - startTime));
    }
}
